<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAppsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('apps', function (Blueprint $table) {
            $table->id();
            $table->string('title')->comment('应用标题')->index();
            $table->string('remark', 500)->comment('备注')->default('');
            $table->string('icon', 2000)->comment('图标')->default('');
            $table->string('store_url', 2000)->comment('下载地址1')->default('');
            $table->string('down_url', 2000)->comment('下载地址2')->default('');
            $table->char('status', 50)->comment('状态')->default(\App\Constant\Enum::STATUS_ENABLED);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('apps');
    }
}
